package org.nutboat.app;

import org.nutboat.core.GameData;
import org.nutboat.core.ListenerList;

public class GameSettings {
	private SettingsListenerList listenerList;
	private GameData data;
	
	public GameSettings() {
		listenerList = new SettingsListenerList();
		data = new GameData();
	}
	
	public SettingsListener[] getSettingsListeners() {
		SettingsListener[] listeners = new SettingsListener[listenerList.size()];
		for (int i = 0; i < listeners.length; i++) {
			listeners[i] = listenerList.getListener(i); 
		}
		return listeners;
	}
	
	public void addSettingsListener(SettingsListener l) {
		listenerList.addListener(l);
	}
	
	public boolean removeSettingsListener(SettingsListener l) {
		return listenerList.removeListener(l);
	}
	
	private class SettingsListenerList extends ListenerList<SettingsListener, SettingsEvent> {

		@Override
		protected void handleEvent(SettingsListener listener,
				SettingsEvent event) {
			
		}
	}
}
